<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title>JavaScript label example</title>
    <style>
      button {
        font-family: "helvetica neue", helvetica, sans-serif;
        letter-spacing: 1px;
        text-transform: uppercase;
        text-align: center;
        border: 2px solid rgb(200 200 0 / 0.6);
        background: rgba(0, 217, 217, 0.6);
        color: rgb(100 0 0 / 1);
        box-shadow: 1px 1px 2px rgb(0 0 200 / 0.4);
        border-radius: 10px;
        padding: 3px 10px;
        cursor: pointer;
      }
    </style>
  </head>
  <body>
    <button type="button">Player 1: Chris</button>

    <script>
      const button = document.querySelector("button");

      button.addEventListener("click", updateName);

      function updateName() {
        const name = prompt("Enter a new name");
        button.textContent = `Player 1: ${name}`;
      }
    </script>
  </body>
</html>
